package com.climber.android.commonres.helper

import android.Manifest
import com.climber.android.commonres.R
import io.ganguo.library.mvp.util.ToastHelper

/**
 * Created by Mikes at 2019/4/27 6:07 PM
 */
class PermissionReallyDeclinedImpl : (String) -> Unit{
    override fun invoke(permissionName: String) {
        when (permissionName) {
            Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE -> ToastHelper.toastMessage(R.string.permission_for_storage_need_grant_in_setting)
            Manifest.permission.CAMERA -> ToastHelper.toastMessage(R.string.permission_for_camera_need_grant_in_setting)
            Manifest.permission.RECORD_AUDIO -> ToastHelper.toastMessage(R.string.permission_for_mic_need_grant_in_setting)
        }
    }
}
